<?xml version="1.0" encoding="ascii"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
          "DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
  <title>numdifftools.nd_scientific.Jacobian</title>
  <link rel="stylesheet" href="epydoc.css" type="text/css" />
  <script type="text/javascript" src="epydoc.js"></script>
</head>

<body bgcolor="white" text="black" link="blue" vlink="#204080"
      alink="#204080">
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="numdifftools-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/numdifftools/">numdifftools</a></th>
          </tr></table></th>
  </tr>
</table>
<table width="100%" cellpadding="0" cellspacing="0">
  <tr valign="top">
    <td width="100%">
      <span class="breadcrumbs">
        <a href="numdifftools-module.html">Package&nbsp;numdifftools</a> ::
        <a href="numdifftools.nd_scientific-module.html">Module&nbsp;nd_scientific</a> ::
        Class&nbsp;Jacobian
      </span>
    </td>
    <td>
      <table cellpadding="0" cellspacing="0">
        <!-- hide/show private -->
        <tr><td align="right"><span class="options">[<a href="javascript:void(0);" class="privatelink"
    onclick="toggle_private();">hide&nbsp;private</a>]</span></td></tr>
        <tr><td align="right"><span class="options"
            >[<a href="frames.html" target="_top">frames</a
            >]&nbsp;|&nbsp;<a href="numdifftools.nd_scientific.Jacobian-class.html"
            target="_top">no&nbsp;frames</a>]</span></td></tr>
      </table>
    </td>
  </tr>
</table>
<!-- ==================== CLASS DESCRIPTION ==================== -->
<h1 class="epydoc">Class Jacobian</h1><p class="nomargin-top"><span class="codelink"><a href="numdifftools.nd_scientific-pysrc.html#Jacobian">source&nbsp;code</a></span></p>
<center>
<center>  <map id="uml_class_diagram_for_numdifft_17" name="uml_class_diagram_for_numdifft_17">
<area shape="rect" id="node1_3" href="numdifftools.nd_scientific.Jacobian-class.html#__call__" title="numdifftools.nd_scientific.Jacobian.__call__" alt="" coords="53,116,159,135"/>
<area shape="rect" id="node1_4" href="numdifftools.nd_scientific.Jacobian-class.html#jacobian" title="Return Jacobian matrix of a vector valued function of n variables" alt="" coords="53,135,159,153"/>
<area shape="rect" id="node1" href="numdifftools.nd_scientific.Jacobian-class.html" title="Estimate Jacobian matrix" alt="" coords="41,83,170,159"/>
<area shape="rect" id="node2_5" href="numdifftools.nd_scientific._Common-class.html#__init__" title="x.__init__(...) initializes x; see help(type(x)) for signature" alt="" coords="17,39,196,57"/>
<area shape="rect" id="node2" href="numdifftools.nd_scientific._Common-class.html" title="numdifftools.nd_scientific._Common" alt="" coords="5,6,208,63"/>
</map>
  <img src="uml_class_diagram_for_numdifft_17.gif" alt='' usemap="#uml_class_diagram_for_numdifft_17" ismap="ismap" class="graph-without-title" />
</center>
</center>
<hr />
<pre class="literalblock">
Estimate Jacobian matrix

The Jacobian matrix is the matrix of all first-order partial derivatives
of a vector-valued function.

Assumptions
-----------
fun : (vector valued)
    analytical function to differentiate.
    fun must be a function of the vector or array x0.

x0 : vector location at which to differentiate fun
    If x0 is an N x M array, then fun is assumed to be
    a function of N*M variables.

Examples
--------
&gt;&gt;&gt; import numdifftools.nd_scientific as nds

#(nonlinear least squares)
&gt;&gt;&gt; xdata = np.reshape(np.arange(0,1,0.1),(-1,1))
&gt;&gt;&gt; ydata = 1+2*np.exp(0.75*xdata)
&gt;&gt;&gt; fun = lambda c: (c[0]+c[1]*np.exp(c[2]*xdata) - ydata)**2
&gt;&gt;&gt; Jfun = nds.Jacobian(fun)
&gt;&gt;&gt; Jfun([1,2,0.75]) # should be numerically zero
array([[ 0.,  0.,  0.],
       [ 0.,  0.,  0.],
       [ 0.,  0.,  0.],
       [ 0.,  0.,  0.],
       [ 0.,  0.,  0.],
       [ 0.,  0.,  0.],
       [ 0.,  0.,  0.],
       [ 0.,  0.,  0.],
       [ 0.,  0.,  0.],
       [ 0.,  0.,  0.]])

See also
--------
Gradient,
Derivative,
Hessdiag,
Hessian

</pre>

<!-- ==================== INSTANCE METHODS ==================== -->
<a name="section-InstanceMethods"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Instance Methods</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-InstanceMethods"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a name="__call__"></a><span class="summary-sig-name">__call__</span>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">x0</span>)</span></td>
          <td align="right" valign="top">
            <span class="codelink"><a href="numdifftools.nd_scientific-pysrc.html#Jacobian.__call__">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
<tr>
    <td width="15%" align="right" valign="top" class="summary">
      <span class="summary-type">&nbsp;</span>
    </td><td class="summary">
      <table width="100%" cellpadding="0" cellspacing="0" border="0">
        <tr>
          <td><span class="summary-sig"><a href="numdifftools.nd_scientific.Jacobian-class.html#jacobian" class="summary-sig-name">jacobian</a>(<span class="summary-sig-arg">self</span>,
        <span class="summary-sig-arg">x0</span>)</span><br />
      Return Jacobian matrix of a vector valued function of n variables</td>
          <td align="right" valign="top">
            <span class="codelink"><a href="numdifftools.nd_scientific-pysrc.html#Jacobian.jacobian">source&nbsp;code</a></span>
            
          </td>
        </tr>
      </table>
      
    </td>
  </tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="numdifftools.nd_scientific._Common-class.html" onclick="show_private();">_Common</a></code></b>:
      <code><a href="numdifftools.nd_scientific._Common-class.html#__init__">__init__</a></code>
      </p>
    <div class="private">    <p class="indent-wrapped-lines"><b>Inherited from <code><a href="numdifftools.nd_scientific._Common-class.html" onclick="show_private();">_Common</a></code></b> (private):
      <code><a href="numdifftools.nd_scientific._Common-class.html#_derivative" onclick="show_private();">_derivative</a></code>,
      <code><a href="numdifftools.nd_scientific._Common-class.html#_gradient" onclick="show_private();">_gradient</a></code>,
      <code><a href="numdifftools.nd_scientific._Common-class.html#_hessian" onclick="show_private();">_hessian</a></code>,
      <code><a href="numdifftools.nd_scientific._Common-class.html#_jacobian" onclick="show_private();">_jacobian</a></code>
      </p></div>
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__delattr__</code>,
      <code>__format__</code>,
      <code>__getattribute__</code>,
      <code>__hash__</code>,
      <code>__new__</code>,
      <code>__reduce__</code>,
      <code>__reduce_ex__</code>,
      <code>__repr__</code>,
      <code>__setattr__</code>,
      <code>__sizeof__</code>,
      <code>__str__</code>,
      <code>__subclasshook__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== PROPERTIES ==================== -->
<a name="section-Properties"></a>
<table class="summary" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Properties</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-Properties"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
  <tr>
    <td colspan="2" class="summary">
    <p class="indent-wrapped-lines"><b>Inherited from <code>object</code></b>:
      <code>__class__</code>
      </p>
    </td>
  </tr>
</table>
<!-- ==================== METHOD DETAILS ==================== -->
<a name="section-MethodDetails"></a>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr bgcolor="#70b0f0" class="table-header">
  <td colspan="2" class="table-header">
    <table border="0" cellpadding="0" cellspacing="0" width="100%">
      <tr valign="top">
        <td align="left"><span class="table-header">Method Details</span></td>
        <td align="right" valign="top"
         ><span class="options">[<a href="#section-MethodDetails"
         class="privatelink" onclick="toggle_private();"
         >hide private</a>]</span></td>
      </tr>
    </table>
  </td>
</tr>
</table>
<a name="jacobian"></a>
<div>
<table class="details" border="1" cellpadding="3"
       cellspacing="0" width="100%" bgcolor="white">
<tr><td>
  <table width="100%" cellpadding="0" cellspacing="0" border="0">
  <tr valign="top"><td>
  <h3 class="epydoc"><span class="sig"><span class="sig-name">jacobian</span>(<span class="sig-arg">self</span>,
        <span class="sig-arg">x0</span>)</span>
  </h3>
  </td><td align="right" valign="top"
    ><span class="codelink"><a href="numdifftools.nd_scientific-pysrc.html#Jacobian.jacobian">source&nbsp;code</a></span>&nbsp;
    </td>
  </tr></table>
  
  <pre class="literalblock">

Return Jacobian matrix of a vector valued function of n variables


Parameter
---------
x0 : vector
    location at which to differentiate fun.
    If x0 is an nxm array, then fun is assumed to be
    a function of n*m variables.

Member variable used
--------------------
fun : (vector valued) analytical function to differentiate.
        fun must be a function of the vector or array x0.

Returns
-------
jac : array-like
   first partial derivatives of fun. Assuming that x0
   is a vector of length p and fun returns a vector
   of length n, then jac will be an array of size (n,p)

err - vector
    of error estimates corresponding to each partial
    derivative in jac.

See also
--------
Derivative,
Gradient,
Hessian,
Hessdiag

</pre>
  <dl class="fields">
  </dl>
</td></tr></table>
</div>
<br />
<!-- ==================== NAVIGATION BAR ==================== -->
<table class="navbar" border="0" width="100%" cellpadding="0"
       bgcolor="#a0c0ff" cellspacing="0">
  <tr valign="middle">
  <!-- Home link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="numdifftools-module.html">Home</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Tree link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="module-tree.html">Trees</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Index link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="identifier-index.html">Indices</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Help link -->
      <th>&nbsp;&nbsp;&nbsp;<a
        href="help.html">Help</a>&nbsp;&nbsp;&nbsp;</th>

  <!-- Project homepage -->
      <th class="navbar" align="right" width="100%">
        <table border="0" cellpadding="0" cellspacing="0">
          <tr><th class="navbar" align="center"
            ><a class="navbar" target="_top" href="http://code.google.com/p/numdifftools/">numdifftools</a></th>
          </tr></table></th>
  </tr>
</table>
<table border="0" cellpadding="0" cellspacing="0" width="100%%">
  <tr>
    <td align="left" class="footer">
    Generated by Epydoc 3.0.1 on Sat May 05 22:01:08 2012
    </td>
    <td align="right" class="footer">
      <a target="mainFrame" href="http://epydoc.sourceforge.net"
        >http://epydoc.sourceforge.net</a>
    </td>
  </tr>
</table>

<script type="text/javascript">
  <!--
  // Private objects are initially displayed (because if
  // javascript is turned off then we want them to be
  // visible); but by default, we want to hide them.  So hide
  // them unless we have a cookie that says to show them.
  checkCookie();
  // -->
</script>
</body>
</html>
